package model

import (
	"gorm.io/gorm"
	"time"
)

type UserDevice struct {
	Id         uint32         `gorm:"column:id;type:int(10) UNSIGNED;primaryKey;not null;" json:"id"`
	CreateTime time.Time      `gorm:"column:create_time;type:datetime(3);not null;default:CURRENT_TIMESTAMP(3);" json:"create_time"`
	UpdateTime time.Time      `gorm:"column:update_time;type:datetime(3);not null;default:CURRENT_TIMESTAMP(3);" json:"update_time"`
	DeleteTime gorm.DeletedAt `gorm:"column:delete_time;type:datetime(3);default:NULL;" json:"delete_time"`
	UserId     int32          `gorm:"column:user_id;type:int(11);not null;" json:"user_id"`
	Token      string         `gorm:"column:token;type:varchar(255);not null;" json:"token"`
}

func (UserDevice) TableName() string {
	return "user_device"
}
